package com.hk.property;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;

@Configuration
@PropertySource("classpath:/com/hk/property/myProperty.property")
public class PropertyConfiguration {

    @Autowired
    private Environment env;

    @Bean
    public MySource mySource(){
        return new MySource(env.getProperty("name"),env.getProperty("addr"));

    }



}
